/*
 *  iokit.h
 *  bbinj
 *
 *  Created by msftguy on 6/5/10.
 *  Copyright 2010 __MyCompanyName__. All rights reserved.
 *
 */

#include <mach/mach_init.h>

typedef mach_port_t	io_object_t;
typedef io_object_t	io_service_t;
typedef io_object_t	io_connect_t;

#ifdef __cplusplus 
extern "C" {
#endif
	
extern const mach_port_t kIOMasterPortDefault;  


CFDictionaryRef IOServiceMatching ( const char* name ) ;

io_service_t IOServiceGetMatchingService( 
										 mach_port_t masterPort, 
										 CFDictionaryRef matching );

kern_return_t IOServiceOpen( 
							io_service_t service, 
							task_port_t owningTask, 
							uint32_t type, 
							io_connect_t *connect );  



kern_return_t
IOConnectCallScalarMethod(
						  mach_port_t	 connection,		// In
						  uint32_t	 selector,		// In
						  const uint64_t	*input,			// In
						  uint32_t	 inputCnt,		// In
						  uint64_t	*output,		// Out
						  uint32_t	*outputCnt);		// In/Out

kern_return_t
IOServiceClose(
			   io_connect_t	connect );

#ifdef __cplusplus 
}
#endif